﻿

namespace OneWorks.Utils.Easyui.Tree
{
    using Newtonsoft.Json;
    using System.Collections.Generic;

    public class Entity
    {
        /// <summary>
        /// An identity value bind to the node.
        /// </summary>
        [JsonProperty(PropertyName = "id")]
        public string ID { get; set; }

        /// <summary>
        /// Text to be showed.
        /// </summary>
        [JsonProperty(PropertyName = "text")]
        public string Text { get; set; }

        /// <summary>
        /// The css class to display icon.
        /// </summary>
        [JsonProperty(PropertyName = "iconCls")]
        public string IconCls { get; set; }

        /// <summary>
        ///  Whether the node is checked.
        /// </summary>
        [JsonProperty(PropertyName = "checked")]
        public string Checked { get; set; }

        /// <summary>
        /// The node state, 'open' or 'closed'.
        /// </summary>
        [JsonProperty(PropertyName = "state")]
        public string State { get; set; }

        /// <summary>
        /// Custom attributes bind to the node.
        /// </summary>
        [JsonProperty(PropertyName = "attributes")]
        public Dictionary<string, object> Attributes { get; set; }

        [JsonProperty(PropertyName = "children")]
        public List<Entity> Childrens { get; set; }

   
    }
}
